Repository navigation
fix: upload pasted images into private SSH directories - #16523
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 1 minute. View limit detailsLimit details: You’ve used all 10 included reviews currently available. Review configuration: ⚙️ Run configurationConfiguration used: Repository: manaflow-ai/cmux/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (10)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
All contributors have signed the CLA ✍️ ✅ |
|
Merge receipt for
Labeled |
main no longer compiles after this merge@teamleaderleo: after Evidence: https://github.com/manaflow-ai/cmux/actions/runs/36935336275/job/110614442984 Nothing blocks merging meanwhile. A fix-forward (or, failing that, a revert) is attempted automatically unless an open pull request already fixes this. main_compile_attribution.py: post-merge, nothing here gates a merge. |
#16523 changed TerminalCustomUploadRunner to read session.remotePastePolicy, but the runner has no session, so the app target stopped compiling. Restore RemoteSessionCoordinator.remoteDropPath, the package's compatibility entry point, which now returns the same private-directory path shape. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FrR7YbsQtGw2eFtDeyiTcK
#16523 called CmuxRemoteSession's internal String.shellSingleQuoted from the app target, which breaks main's compile. DetectedSSHSession already has an identical private static shellSingleQuoted(_:); use it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FrR7YbsQtGw2eFtDeyiTcK
#16523 changed TerminalCustomUploadRunner to read session.remotePastePolicy, but the runner has no session, so the app target stopped compiling. Restore RemoteSessionCoordinator.remoteDropPath, the package's compatibility entry point, which now returns the same private-directory path shape. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FrR7YbsQtGw2eFtDeyiTcK
0906bcb fix: make main's full test suite pass again (manaflow-ai#16429) 11bfe00 Restore custom sidebar preview gallery (manaflow-ai#16535) 343dd1b web: sync all Hexclave webhooks into a validated, order-independent mirror (manaflow-ai#16339) 00547d5 ci: avoid blaming unrelated merges for compile failures (manaflow-ai#16533) b782440 fix(ci): provision Go for every iOS Release archive (manaflow-ai#16534) 3555618 Add a Jump to Bottom button to terminal panes (manaflow-ai#15382) 79febcf fix: tolerate delayed App Store Connect processing (manaflow-ai#16527) fcbf13c fix: export Foundation for remote paste policy (manaflow-ai#16525) 6d86537 Add What's New recap with an off / quiet / sheet setting (manaflow-ai#14876) 256d964 fix(xcstrings): keep conflict resolutions valid JSON (manaflow-ai#16071) 8473bdc fix: upload pasted images into private SSH directories (manaflow-ai#16523) 53c705c Show opt-in model, context %, and estimated cost next to agent status in the sidebar (manaflow-ai#14855) eba3c42 remote relay: permit scoped terminal paste (manaflow-ai#14915) e447665 fix: stop update relaunch prompts from looping (manaflow-ai#15702) 4a46320 Fix Cloud paid team limits for ID-only selected teams (manaflow-ai#16318) c266af9 test(cloud): pin the CLI tree's link error message through the bundled CLI (manaflow-ai#16515) 0059066 Calmer focus feedback: one short pulse, no flash while typing (manaflow-ai#14894) 65930fc fix(remote): preserve tmux split metadata (manaflow-ai#16398) 512817d docs: fill missing unreleased user-facing changes (manaflow-ai#16519) f204ade ci: nightly 120 Hz fling bench for the cmux-next agent pane (manaflow-ai#16511) 2be3b26 Remove generated custom sidebar preview art (manaflow-ai#16518)
#14855 optional chain) (#16531) * fix: quote SSH paste scripts with the detector's own helper #16523 called CmuxRemoteSession's internal String.shellSingleQuoted from the app target, which breaks main's compile. DetectedSSHSession already has an identical private static shellSingleQuoted(_:); use it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FrR7YbsQtGw2eFtDeyiTcK * fix: restore the custom upload runner's remote drop path #16523 changed TerminalCustomUploadRunner to read session.remotePastePolicy, but the runner has no session, so the app target stopped compiling. Restore RemoteSessionCoordinator.remoteDropPath, the package's compatibility entry point, which now returns the same private-directory path shape. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FrR7YbsQtGw2eFtDeyiTcK * fix: drop a stray optional chain in the sidebar usage owner lookup #14855's `.max { ... }?` chains on an already-optional element, which the compiler rejects ("optional chain has no effect"). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FrR7YbsQtGw2eFtDeyiTcK --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
8b8762a fix(settings): tolerate missing custom sidebar previews (manaflow-ai#16545) 30226ce fix: repair main's app compile (manaflow-ai#16523 SSH paste quoting + upload path, manaflow-ai#14855 optional chain) (manaflow-ai#16531) 1440e29 Add secure one-time CodeRouter handoff leases (manaflow-ai#10118) 77fd1d5 test(sidebar): resolve a committed conflict marker, keeping both tests (manaflow-ai#16540)
…ed it #16523 made every successful relay stop run a synchronous ssh (8s timeout) under the coordinator lock to remove the session's paste directory, even when the session never uploaded a file. That adds a remote round trip to every remote workspace teardown and crashes CmuxRemoteSession's intentional-cleanup tests, whose runner forbids spawning processes. Track whether this session touched its paste directory and only clean it up then. Drop the lifecycle test's carve-out for the paste command, since stop no longer issues one without uploads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test: align remote paste tests with #16523's private paste directory - Policy maintenance test: give the size-capped files distinct mtimes; with same-second mtimes the script's "oldest" fell back to glob order. - emittedText fallback test: pass a cmux-paste path instead of expecting a string the input never contained. - Detected SSH upload cleanup test: the first ssh call is now directory maintenance; assert on the last (cleanup) call and the uploaded file name, since cleanup addresses files through "$HOME/...". - Cleanup lifecycle runner: treat the paste-directory teardown that follows a successful relay stop as neither relay cleanup nor a startup request. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(remote): only clean the remote paste directory if this session used it #16523 made every successful relay stop run a synchronous ssh (8s timeout) under the coordinator lock to remove the session's paste directory, even when the session never uploaded a file. That adds a remote round trip to every remote workspace teardown and crashes CmuxRemoteSession's intentional-cleanup tests, whose runner forbids spawning processes. Track whether this session touched its paste directory and only clean it up then. Drop the lifecycle test's carve-out for the paste command, since stop no longer issues one without uploads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
abdf121 fix: exclude unowned same-TTY processes from memory attribution (manaflow-ai#16559) 075dbef test: fix remote paste test failures on main from manaflow-ai#16523 (manaflow-ai#16596) 7d7a9d1 Stop US key positions from hijacking shortcuts on non-US layouts (manaflow-ai#16237) 134c9d9 Let AppKit cycle windows with the System Settings shortcut on ISO keyboards (manaflow-ai#16238) d0dd457 iOS: prevent toolbar flash when switching primary tabs (manaflow-ai#15712) 6c4b727 test(cloud): re-enable the Cloud header width tests by measuring each row (manaflow-ai#16590) 51b60f3 fix(remote): keep reconnect cleanup fixture process-free (manaflow-ai#16586) 6090053 fix(ci): reserve only queued release slots (manaflow-ai#16588) 0440a5d fix: make browser import hint cover all supported browsers (manaflow-ai#16483)
|
This changed the path a #17388 updates the docs and comments to say the command has to create the directory. |
Summary
Cmd+Vwith an image now uploads the materialized clipboard file through the existing cmux SSH/SCP transfer path before inserting the remote path. Local terminals still insert the existing local temporary path and keep the existing local cleanup.Remote uploads use a random per-session directory under
~/.cache/cmux/paste, with a0700directory and0600files. Every upload removes files older than 24 hours and trims the oldest files when the session directory exceeds 200 MB. Clean relay teardown removes only that session's paste files. Upload or permission failures call the existing failure path and insert no local path.Sundial g1 🛠️
Relay authorization analysis
No relay method or relay allowlist entry was added. The implementation reuses the existing app-side
RemoteSessionCoordinator.uploadDroppedFilesand detected-SSH SCP path. There is no new relay payload, command-bearing parameter, remote object selector, or remote state read. The coordinator owns a random session policy and teardown cleanup is scoped to that policy's directory.Testing
python3 scripts/verify-local.py --affected upstream/mainpasses syntax, test wiring, package groups, and feature-flag checks.The first commit is the red policy test proof; the second commit implements the policy and transfer changes.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Pasted images in remote terminals now upload through the existing SSH/SCP transfer path instead of inserting a local clipboard path, so
Cmd+Von an SSH session inserts the remote file.Uploads land in a private per-session directory under
~/.cache/cmux/paste, enforced to0700directories and0600files. Each upload deletes files older than 24 hours and trims the oldest files past a 200 MB cap. Relay teardown removes only that session's paste files.RemoteSessionCoordinator.uploadDroppedFilesand detected-SSH SCP paths.Written for commit 6df2cdf. Summary will update on new commits.